<%@ Control Language="vb" AutoEventWireup="false"  Explicit="true" codefile="Edit.ascx.vb" Inherits="NVPortal.Modules.NVNews.Edit" %>
<%@ Register TagPrefix="dnn" TagName="TextEditor" Src="~/controls/TextEditor.ascx"%>
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.UI.WebControls" Assembly="DotNetNuke.Web" %>
<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.UI.WebControls" Assembly="DotNetNuke" %>
<script type="text/javascript" language="JavaScript" src="/js/NVCorp.js"></script>
<style type="text/css">
.upnewstd1, .upnewstd2 {padding: 8px 0px; border-bottom: solid 1px #eee;}
</style>
    <table id="Table1" width="100%" cellpadding="0" cellspacing="0" style="font-family: Arial; font-size: 12px; color:#434343;" align="center">
	    <tr>
		    <td colspan="2" style="display:none;">
			    <asp:linkbutton id="lbtUpdateTop" runat="server" Font-Bold="True"><img src="images/Acapnhat.jpg" alt="" /></asp:linkbutton>&nbsp;&nbsp;
			    <asp:linkbutton id="lbtDeleteTop" runat="server" Font-Bold="True">Xoá tin</asp:linkbutton>&nbsp;&nbsp;
			    <asp:linkbutton id="lbtCancelTop" runat="server" Font-Bold="True">Huỷ bỏ</asp:linkbutton>
		    </td>
	    </tr>
	    <tr>
		    <td colspan="2"><asp:Label id="lbResult" runat="server" CssClass="NormalRed"></asp:Label></td>
	    </tr>
	    <tr>
		    <td class="upnewstd1">Tiêu đề:</td>
		    <td class="upnewstd2"><asp:textbox id="txtTitle" runat="server" Width="400px" Font-Bold="true" Font-Size="14px"></asp:textbox></td>
	    </tr>
	    <tr>
		    <td class="upnewstd1">
			    <asp:Label CssClass="SubHead" id="Label5" runat="server">Thư mục</asp:Label></td>
		    <td class="upnewstd2">
			    <asp:DropDownList id="ddlCategory" runat="server" Width="280px" Height="20px" Font-Bold="true" Font-Size="13px"></asp:DropDownList></td>
	    </tr>
	    <tr>
		    <td colspan="2">
			    <table cellpadding="0" cellspacing="0" style="border: 0px; text-align: center; width: 100%; background: #eee; height: 25px;">
				    <tr>
					    <td style="width: 33%; text-align: center">
						    <asp:Label CssClass="SubHead" id="Label7" runat="server">Nổi bật Mục</asp:Label>&nbsp;&nbsp;&nbsp;
						    <asp:CheckBox id="chkHotCat" runat="server"></asp:CheckBox></td>
					    <td style="width: 33%; text-align: center">
						    <asp:Label CssClass="SubHead" id="Label8" runat="server">Nổi bật Trang</asp:Label>
						    <asp:CheckBox id="chkHotSite" runat="server"></asp:CheckBox></td>
					    <td style="width: 33%; text-align: center">
						    <asp:Label CssClass="SubHead" id="Label10" runat="server">Đặt chú ý</asp:Label>
						    <asp:CheckBox id="chkNotes" runat="server"></asp:CheckBox></td>
				    </tr>
			    </table>
		    </td>
	    </tr>
	
	    <tr>
		    <td class="upnewstd1">Chọn Ảnh Bé:<br /></td>
		    <td class="upnewstd2"><input id="txtFile" type="file" size="40" name="txtFile" runat="server" />&nbsp;&nbsp;
			    <asp:linkbutton id="lbtUpload" runat="server"><font style="color: Black; font-weight: bold">[Tải lên server]</font></asp:linkbutton>&nbsp;&nbsp;
			    <asp:linkbutton id="lbtCancel" runat="server"><font style="color: Black; font-weight: bold">[Huỷ bỏ]</font></asp:linkbutton><br />
			    <asp:image id="imgNews" runat="server" Width="100" Visible="False"></asp:image><br />
			    Link ảnh: <asp:label id="lblMessage" runat="server" CssClass="NormalRed"></asp:label></td>
	    </tr>
	    <tr>
	        <td class="upnewstd1">
	            Link ảnh bé:
	        </td>
	        <td class="upnewstd2"><asp:textbox id="txtLinkImage" runat="server" Width="360px"></asp:textbox></td>
	    </tr>
	    <tr>
		    <td class="upnewstd1">Chọn Ảnh tin HOT<br />(<i>Với bài nổi bật</i>)</td>
		    <td class="upnewstd2"><input id="txtFileHOT" type="file" size="40" name="txtFile" runat="server" />&nbsp;&nbsp;
			    <asp:linkbutton id="lbtUploadHOT" runat="server"><font style="color: Black; font-weight: bold">[Tải lên server]</font></asp:linkbutton>&nbsp;&nbsp;
			    <asp:linkbutton id="lbtCancelHOT" runat="server"><font style="color: Black; font-weight: bold">[Huỷ bỏ]</font></asp:linkbutton><br />
			    <asp:image id="imgNewsHOT" runat="server" Width="100" Visible="False"></asp:image><br />
			    <asp:label id="lblMessageHOT" runat="server" CssClass="NormalRed"></asp:label>
                </td>
	    </tr>
	    <tr>
	        <td class="upnewstd1">
	            <asp:label CssClass="SubHead" id="Label14" runat="server">Link ảnh tin HOT</asp:label>
	        </td>
	        <td class="upnewstd2"><asp:textbox id="txtLinkImageHOT" runat="server" Width="360px"></asp:textbox></td>
	    </tr>
	    <tr>
		    <td class="upnewstd1"><asp:label CssClass="SubHead" id="Label3" runat="server">Tóm tắt <br /><font style="color: red;">Phải Nhập *</font></asp:label></td>
		    <td class="upnewstd2"><asp:textbox id="txtSummary" runat="server" Width="560px" Height="88px" TextMode="MultiLine"></asp:textbox></td>
	    </tr>
    </table>
    <table id="Table2" width="100%" cellpadding="0" cellspacing="0" style="font-family: Tahoma; font-size: 12px; color:#434343;" align="center">
	    <tr style="display:none"><td><h3>Tóm tắt Tin Ngang Với Tiêu Đề ở Chi tiết</h3></td></tr>
        <tr style="display:none">
            <td>
                <dnn:TextEditor id="TextEditor2" EnableViewState="false" EnableTheming="true" ChooseRender="false" Width="98%" Height="200" runat="server" />
            </td>
        </tr>
        <tr><td><h3>Nội dung tin</h3></td>
	    </tr>
	    <tr>
		    <td><dnn:TextEditor DefaultMode="basic" id="TextEditor1" Width="98%" Height="500" runat="server" /></td>
	    </tr>
    </table>
    <table id="Table3" width="100%" cellpadding="0" cellspacing="0" style="font-family: Tahoma; font-size: 12px; color:#434343;" align="center">
	    <tr>
		    <td class="upnewstd1"><asp:label CssClass="SubHead" id="Label11" runat="server">Link nguồn: </asp:label></td>
		    <td class="upnewstd2"><asp:textbox id="txtLinkNguon" runat="server" Width="400px" Font-Bold="true" Font-Size="14px"></asp:textbox></td>
	    </tr>
        <tr>
            <td class="upnewstd1"><asp:label CssClass="SubHead" id="Label1" runat="server">Trang nguồn: </asp:label></td>
		    <td class="upnewstd2"><asp:DropDownList ID="ddlNguonTin" runat="server"></asp:DropDownList></td>
        </tr>
    </table>
    <table id="Table4" width="100%" cellpadding="0" cellspacing="0" style="font-family: Tahoma; font-size: 12px; color:#434343;" align="center">
	    <tr>
	        <td style="vertical-align: top; padding: 5px 0px;" id="tdTinlienquan" runat="server">
	            <fieldset style="border: 1px solid #dedede;">
	            <legend>
	                <h2><font style="font-family: Arial; font-size: 15px; font-weight: bold; color:Blue">Chọn tin liên quan</font></h2></legend>
	                <table width="100%" cellpadding="0" cellspacing="0" style="font-family: Tahoma; font-size: 12px; color:#434343;" align="center">
                        <tr>
                            <td style="width: 50%; vertical-align: top; padding: 5px;">
                                <table width="100%" cellpadding="0" cellspacing="0" style="font-family: Tahoma; font-size: 12px; color:#434343;" align="center">
                                    <tr>
		                                <td>Thư mục tin: <asp:dropdownlist id="ddlCategoryR" runat="server" Width="160px" OnSelectedIndexChanged="ddlCategoryR_SelectedIndexChanged" AutoPostBack="true"></asp:dropdownlist></td>
	                                </tr>
                                    <tr>
                                        <td style="font-family: Tahoma; font-size: 12px; padding: 3px;">
                                                    Chọn 
                                                    <asp:CheckBox ID="CheckBox1" runat="server" /> để  &nbsp;
                                                    <asp:LinkButton ID="lbtSendForApprove" runat="server"><img src="/images/Atinlienquan.jpg" alt="Gửi đăng" border="0" /></asp:LinkButton>
                                                
                                        </td>
                                    </tr>
	                                <tr>
		                                <td>
                                            <asp:UpdatePanel ID="udpComent" runat="server">
                                                <ContentTemplate>			
			                                    <asp:datagrid id="drgDataViewerR" DataKeyField="NewId" runat="server" Width="100%" AllowPaging="true" AutoGenerateColumns="False"
				                                    CellPadding="3" BackColor="White" Font-Names="Arial" BorderWidth="1px" BorderStyle="None" BorderColor="#CCCCCC" PageSize="10">
				                                    <FooterStyle ForeColor="#000066" Font-Names="Arial" BackColor="White"></FooterStyle>
				                                    <Columns>
				                                         <asp:TemplateColumn>
                                                            <ItemTemplate>
                                                                <asp:CheckBox ID="chkItems" runat="server" />
                                                            </ItemTemplate>
                                                            <ItemStyle Width="20" />
                                                            <HeaderStyle CssClass="UN_Header" />
                                                        </asp:TemplateColumn>
					                                    <asp:BoundColumn DataField="newid" HeaderText="M&#227; tin" Visible="False" ></asp:BoundColumn>
					                                    <asp:TemplateColumn>
                                                            <ItemTemplate>
                                                                <asp:Label ID="Label5" Font-Names="tahoma" Font-Size="11px" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Title") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <HeaderStyle CssClass="UN_Header" />
                                                            <ItemStyle CssClass="UN_Item" />
                                                        </asp:TemplateColumn>
                                                        <asp:BoundColumn DataField="Categoryname">
                                                            <HeaderStyle CssClass="UN_Header" />
                                                            <ItemStyle CssClass="UN_Item" />
                                                        </asp:BoundColumn>
				                                    </Columns>
                                                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                                    <EditItemStyle BackColor="#999999" />
                                                    <SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                    <AlternatingItemStyle BackColor="White" ForeColor="#284775" />
                                                    <ItemStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
				                                    <PagerStyle HorizontalAlign="Left" Font-Names="tahoma" Font-Size="11px" ForeColor="#000066" BackColor="White" Mode="NumericPages"></PagerStyle>
			                                    </asp:datagrid>
		                                        </ContentTemplate>
                                                <Triggers>
                                                    <asp:AsyncPostBackTrigger ControlID="ddlCategoryR" EventName="SelectedIndexChanged" />
                                                </Triggers>
                                            </asp:UpdatePanel>	
	                                    </td>
	                                </tr>
                                </table>
                            </td>
                            <td style="width: 50%; vertical-align: top; padding: 15px 5px 5px;">
                            <h1><font style="color:Blue">Danh sách tin liên quan</font></h1>
                                <asp:UpdatePanel ID="udpBindNewsRelated" runat="server">
	                                <ContentTemplate>
	                                <asp:DataList ID="dlNewsRelated" runat="server">
	                                    <ItemTemplate>
	                                        <asp:Label ID="lblTitleNewsRelated" Font-Names="Tahoma" Font-Size="11px" runat="server" Text='<%#GetTitle(Databinder.Eval(Container.DataItem,"newid_Related")) %>'></asp:Label>
	                                        <asp:linkbutton id="lbtDelNewsRelated" runat="server" OnClick="DelNewsRelated" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "Id") %>'><img src="/images/Axoa.jpg" style="border: 0px;" alt="Xóa tin" /></asp:linkbutton>
	                                    </ItemTemplate>
	                                </asp:DataList>
	                                </ContentTemplate>
	                            </asp:UpdatePanel>
                            </td>
                            
                        </tr>
                    </table>
                    
	            </fieldset>
	        </td>
	    </tr>
        <tr>
		    <td style="padding: 10px; background: #efefef">
		        <table cellpadding="0" cellspacing="0">
		            <tr>
		                <td>Bình luận: <asp:CheckBox id="chkBL" Checked="true" runat="server"></asp:CheckBox></td><td width="40"></td>
                        <td><asp:linkbutton id="lbtGuiluon" runat="server" Font-Bold="True"><img src="/images/Axuatban.jpg" style="border: 0px;" alt="Xuất bản" /></asp:linkbutton></td>
                        <td width="40"></td>
                        <td><asp:linkbutton id="lbtUpdateBottom" runat="server" Font-Bold="True"><img src="/images/Acapnhat.jpg" style="border: 0px;" alt="Cập nhật" /></asp:linkbutton></td>
		                <td width="40"></td>
		                <td><asp:linkbutton id="lbtDeleteBottom" runat="server" Font-Bold="True"><img src="/images/Axoa.jpg" style="border: 0px;" alt="Xóa tin" /></asp:linkbutton></td>
		                <td width="40"></td>
		                <td><asp:linkbutton id="lbtCancelBottom" runat="server" Font-Bold="True"><img src="/images/Aback.jpg" style="border: 0px;" alt="Xóa tin" /></asp:linkbutton></td>
		            </tr>
		        </table>
		    </td>
	    </tr>
    </table>
